package cn.rongdao.jrkabao.model.remind;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import java.util.List;

import cn.rongdao.jrkabao.bean.remind.RemindMailListBean;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/11/28
 */

public class ServiceModel extends BaseKaMaoModel {

    public static ServiceModel getInstance() {
        return getPresent(ServiceModel.class);
    }

    public void execute(String remindId, Observer<List<RemindMailListBean>> observer) {
        addParamStrings("id", FRString.valueOf(remindId));
        Observable<List<RemindMailListBean>> observable = mServletApi.getServiceListData(mParams).map(new HttpFunction<List<RemindMailListBean>>());
        toSubscribe(observable, observer);
    }
}